#coding=utf-8
"""
login的页面服务器端渲染
"""
from tornroutes import route
from react.conf import settings
from .base import BaseHandler
from ..tools import unblock, render

@route('/login')
class LoginHandler(BaseHandler):
    """
    登陆页面
    """
    @unblock
    def get(self):
        if settings.RENDER:
            rendered = render(
                '/login',
                {},
                to_static_markup=False,
            )
            self.render('render.html', rendered=rendered)
        else:
            self.render("index.html")
